const app = getApp();
import { Cars } from "../../../models/cars";
const cars = new Cars();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    baseImgUrl: getApp().globalImgUrl.config.baseImgUrl,
    detail: {},
  },
  handlerGobackClick() {
    wx.navigateBack();
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    cars.detail(options).then((res) => {
      let detail = res.result.records[0] || {};
      this.setData({ detail });
    });
  },
});
